package me.helllp.dake.iam.core.rest;

import me.helllp.dake.common.MessageCode;
import me.helllp.dake.common.base.BaseController;
import me.helllp.dake.common.base.BaseResult;
import me.helllp.dake.core.bean.DakeAuthAccount;
import me.helllp.dake.core.utils.AccountUtil;
import me.helllp.dake.core.utils.MessageUtils;
import me.helllp.dake.iam.core.dto.UserDto;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户信息管理
 *
 * @author 林晓明
 */
@RestController
@RequestMapping("/system/user")
public class DakeUserController extends BaseController {
    @PostMapping(path = "/add")
    public BaseResult<?> addUser(@RequestBody UserDto userDto) {
        DakeAuthAccount account = AccountUtil.toAuthAccount();
        Assert.notNull(account, MessageUtils.message(MessageCode.MSG_AUTH_NOT_LOGIN));
        return null;
    }
}
